.class public Lcom/baidu/mobads/production/f/b;
.super Lcom/baidu/mobads/production/b;
.source "SourceFile"

# interfaces
.implements Lcom/baidu/mobads/production/f/a;


# instance fields
.field private A:Lcom/baidu/mobads/production/f/d;

.field private B:Lcom/baidu/mobads/AdSize;

.field private C:Z

.field private D:Z

.field private E:Landroid/app/Activity;

.field private F:Landroid/widget/RelativeLayout;

.field private G:Ljava/lang/Boolean;

.field public final y:Ljava/lang/String;

.field protected final z:Lcom/baidu/mobads/interfaces/utils/IXAdLogger;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/widget/RelativeLayout;Ljava/lang/Boolean;Ljava/lang/String;)V
    .locals 2

    .line 1
    invoke-direct {p0, p1}, Lcom/baidu/mobads/production/b;-><init>(Landroid/content/Context;)V

    const-string v0, "html5_intersitial"

    .line 2
    iput-object v0, p0, Lcom/baidu/mobads/production/f/b;->y:Ljava/lang/String;

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    .line 4
    iput-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    .line 5
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/mobads/production/f/b;->z:Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    .line 6
    invoke-virtual {p0, p4}, Lcom/baidu/mobads/production/b;->setId(Ljava/lang/String;)V

    .line 7
    invoke-virtual {p0, p1}, Lcom/baidu/mobads/production/b;->setActivity(Landroid/content/Context;)V

    .line 8
    invoke-virtual {p0, p2}, Lcom/baidu/mobads/production/b;->setAdSlotBase(Landroid/widget/RelativeLayout;)V

    .line 9
    sget-object p1, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;->SLOT_TYPE_INTERSTITIAL:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    iput-object p1, p0, Lcom/baidu/mobads/production/b;->o:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    .line 10
    iput-object p3, p0, Lcom/baidu/mobads/production/f/b;->G:Ljava/lang/Boolean;

    .line 11
    sget-object p1, Lcom/baidu/mobads/AdSize;->InterstitialGame:Lcom/baidu/mobads/AdSize;

    iput-object p1, p0, Lcom/baidu/mobads/production/f/b;->B:Lcom/baidu/mobads/AdSize;

    .line 12
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p1

    invoke-virtual {p1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdConstants()Lcom/baidu/mobads/utils/l;

    .line 13
    new-instance p1, Lcom/baidu/mobads/production/f/d;

    .line 14
    invoke-virtual {p0}, Lcom/baidu/mobads/production/b;->getApplicationContext()Landroid/content/Context;

    move-result-object p2

    invoke-virtual {p0}, Lcom/baidu/mobads/production/b;->getActivity()Landroid/app/Activity;

    move-result-object p3

    iget-object v0, p0, Lcom/baidu/mobads/production/b;->o:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-direct {p1, p2, p3, v0, v1}, Lcom/baidu/mobads/production/f/d;-><init>(Landroid/content/Context;Landroid/app/Activity;Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;Ljava/lang/Boolean;)V

    iput-object p1, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    .line 15
    invoke-virtual {p1, p4}, Lcom/baidu/mobads/vo/d;->d(Ljava/lang/String;)V

    .line 16
    iget-object p1, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    sget-object p2, Lcom/baidu/mobads/AdSize;->InterstitialGame:Lcom/baidu/mobads/AdSize;

    invoke-virtual {p2}, Lcom/baidu/mobads/AdSize;->getValue()I

    move-result p2

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/d;->f(I)V

    .line 17
    iget-object p1, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    invoke-virtual {p1}, Lcom/baidu/mobads/vo/d;->d()Lcom/baidu/mobads/interfaces/IXAdProdInfo;

    move-result-object p1

    check-cast p1, Lcom/baidu/mobads/vo/b;

    .line 18
    invoke-virtual {p1}, Lcom/baidu/mobads/vo/b;->getAttribute()Lorg/json/JSONObject;

    move-result-object p2

    if-nez p2, :cond_0

    .line 19
    new-instance p2, Lorg/json/JSONObject;

    invoke-direct {p2}, Lorg/json/JSONObject;-><init>()V

    :cond_0
    :try_start_0
    const-string p3, "ABILITY"

    const-string v0, "PAUSE,"

    .line 20
    invoke-virtual {p2, p3, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 21
    :catch_0
    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/b;->a(Lorg/json/JSONObject;)V

    .line 22
    invoke-virtual {p0, p4}, Lcom/baidu/mobads/production/b;->f(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic a(Lcom/baidu/mobads/production/f/b;Landroid/content/Context;)Landroid/view/ViewGroup;
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/baidu/mobads/production/f/b;->b(Landroid/content/Context;)Landroid/view/ViewGroup;

    move-result-object p0

    return-object p0
.end method

.method static synthetic a(Lcom/baidu/mobads/production/f/b;)Landroid/widget/RelativeLayout;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    return-object p0
.end method

.method static synthetic a(Lcom/baidu/mobads/production/f/b;Z)Z
    .locals 0

    .line 3
    iput-boolean p1, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    return p1
.end method

.method private b(Landroid/content/Context;)Landroid/view/ViewGroup;
    .locals 0

    .line 2
    check-cast p1, Landroid/app/Activity;

    invoke-virtual {p1}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object p1

    invoke-virtual {p1}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/view/ViewGroup;

    return-object p1
.end method

.method static synthetic b(Lcom/baidu/mobads/production/f/b;)Landroid/widget/RelativeLayout;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    return-object p0
.end method

.method static synthetic c(Lcom/baidu/mobads/production/f/b;)Landroid/widget/RelativeLayout;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/baidu/mobads/production/f/b;->F:Landroid/widget/RelativeLayout;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 0

    .line 33
    invoke-virtual {p0}, Lcom/baidu/mobads/production/b;->load()V

    return-void
.end method

.method public a(II)V
    .locals 0

    return-void
.end method

.method public a(Landroid/app/Activity;)V
    .locals 5

    .line 8
    iget-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    .line 9
    iput-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    const/4 v1, 0x0

    .line 10
    iput-boolean v1, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    .line 11
    iput-object p1, p0, Lcom/baidu/mobads/production/f/b;->E:Landroid/app/Activity;

    .line 12
    invoke-virtual {p0}, Lcom/baidu/mobads/production/f/b;->start()V

    .line 13
    new-instance v2, Landroid/graphics/Rect;

    invoke-direct {v2}, Landroid/graphics/Rect;-><init>()V

    .line 14
    invoke-virtual {p1}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3, v2}, Landroid/view/View;->getWindowVisibleDisplayFrame(Landroid/graphics/Rect;)V

    .line 15
    iget-object v3, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {v3, v1}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 16
    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v3, -0x1

    invoke-direct {v1, v3, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 17
    iget v2, v2, Landroid/graphics/Rect;->top:I

    iput v2, v1, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    .line 18
    invoke-direct {p0, p1}, Lcom/baidu/mobads/production/f/b;->b(Landroid/content/Context;)Landroid/view/ViewGroup;

    move-result-object v2

    .line 19
    new-instance v4, Landroid/widget/RelativeLayout;

    invoke-direct {v4, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput-object v4, p0, Lcom/baidu/mobads/production/f/b;->F:Landroid/widget/RelativeLayout;

    .line 20
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {v4, p1, v1}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 21
    iget-object p1, p0, Lcom/baidu/mobads/production/f/b;->F:Landroid/widget/RelativeLayout;

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v3, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, p1, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 22
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {p1, v0}, Landroid/widget/RelativeLayout;->setFocusableInTouchMode(Z)V

    .line 23
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {p1, v0}, Landroid/widget/RelativeLayout;->setFocusable(Z)V

    .line 24
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {p1}, Landroid/widget/RelativeLayout;->requestFocus()Z

    return-void

    .line 25
    :cond_0
    iget-boolean p1, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    if-eqz p1, :cond_1

    .line 26
    iget-object p1, p0, Lcom/baidu/mobads/production/f/b;->z:Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    const-string v0, "interstitial ad is showing now"

    invoke-interface {p1, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w(Ljava/lang/String;)I

    goto :goto_0

    .line 27
    :cond_1
    iget-boolean p1, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    if-nez p1, :cond_2

    .line 28
    iget-object p1, p0, Lcom/baidu/mobads/production/f/b;->z:Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    const-string v0, "interstitial ad is not ready"

    invoke-interface {p1, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w(Ljava/lang/String;)I

    :cond_2
    :goto_0
    return-void
.end method

.method public a(Landroid/app/Activity;Landroid/widget/RelativeLayout;)V
    .locals 0

    return-void
.end method

.method protected a(Lcom/baidu/mobads/interfaces/IXAdContainer;Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/mobads/interfaces/IXAdContainer;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    const/4 p1, 0x1

    .line 29
    iput-boolean p1, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    if-eqz p2, :cond_0

    const-string p1, "type"

    .line 30
    invoke-virtual {p2, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 31
    check-cast p1, Ljava/lang/String;

    const-string p2, "video"

    .line 32
    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    :cond_0
    return-void
.end method

.method protected a(Lcom/baidu/mobads/openad/d/b;Lcom/baidu/mobads/production/u;I)V
    .locals 1

    .line 4
    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "{\'ad\':[{\'id\':99999999,\'url\':\'"

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    .line 5
    invoke-virtual {v0}, Lcom/baidu/mobads/production/f/d;->b()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "\', type=\'"

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdInstanceInfo$CreativeType;->HTML:Lcom/baidu/mobads/interfaces/IXAdInstanceInfo$CreativeType;

    .line 6
    invoke-virtual {v0}, Lcom/baidu/mobads/interfaces/IXAdInstanceInfo$CreativeType;->getValue()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "\'}],\'n\':1}"

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    .line 7
    invoke-virtual {p2, p1, p3}, Lcom/baidu/mobads/production/u;->a(Lcom/baidu/mobads/openad/d/b;Ljava/lang/String;)V

    return-void
.end method

.method public b()Lcom/baidu/mobads/vo/d;
    .locals 1

    .line 3
    iget-object v0, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    return-object v0
.end method

.method protected b(Lcom/baidu/mobads/interfaces/IXAdContainer;Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/mobads/interfaces/IXAdContainer;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    return-void
.end method

.method public b(Lcom/baidu/mobads/interfaces/IXAdResponseInfo;)V
    .locals 0

    return-void
.end method

.method public c()V
    .locals 0

    return-void
.end method

.method protected d()V
    .locals 1

    const/16 v0, 0x1f40

    .line 1
    iput v0, p0, Lcom/baidu/mobads/production/b;->m:I

    return-void
.end method

.method protected e(Lcom/baidu/mobads/interfaces/IXAdContainer;Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/mobads/interfaces/IXAdContainer;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    .line 1
    invoke-virtual {p0}, Lcom/baidu/mobads/production/f/b;->t()V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/baidu/mobads/production/f/b;->D:Z

    return-void
.end method

.method public synthetic getAdRequestInfo()Lcom/baidu/mobads/interfaces/IXAdRequestInfo;
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/baidu/mobads/production/f/b;->b()Lcom/baidu/mobads/vo/d;

    move-result-object v0

    return-object v0
.end method

.method public request()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/f/b;->A:Lcom/baidu/mobads/production/f/d;

    invoke-super {p0, v0}, Lcom/baidu/mobads/production/b;->a(Lcom/baidu/mobads/vo/d;)Z

    return-void
.end method

.method public start()V
    .locals 0

    .line 1
    invoke-super {p0}, Lcom/baidu/mobads/production/b;->start()V

    return-void
.end method

.method public t()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/f/b;->E:Landroid/app/Activity;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    new-instance v1, Lcom/baidu/mobads/production/f/c;

    invoke-direct {v1, p0}, Lcom/baidu/mobads/production/f/c;-><init>(Lcom/baidu/mobads/production/f/b;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method public w()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/baidu/mobads/production/f/b;->C:Z

    return v0
.end method
